﻿using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Volo.Abp;
using Xms.Abp.AspNetCore.Mvc;

namespace FeatureManagement;

[RemoteService(Name = FeatureManagementRemoteServiceConsts.RemoteServiceName)]
[Area(FeatureManagementRemoteServiceConsts.ModuleName)]
[Route("api/management/features")]
public class FeatureController : XmsController<IFeatureAppService>, IFeatureAppService
{
    [HttpGet]
    public virtual async Task<FeatureListResult> GetAsync(string providerName, string providerKey)
        => await CurrentService.GetAsync(providerName, providerKey);

    [HttpPut]
    public virtual async Task UpdateAsync(string providerName, string providerKey, FeaturesUpdateParameter input)
        => await CurrentService.UpdateAsync(providerName, providerKey, input);
}
